import request from '@/config/axios'

// 游客文章浏览记录 VO
export interface VisitHistoryBrowseVO {
  id: number // 编号
  visit: string // 游客
  articleId: number // 文章编号
  articleName: string // 文章编号
}

// 游客文章浏览记录 API
export const VisitHistoryBrowseApi = {
  // 查询游客文章浏览记录分页
  getVisitHistoryBrowsePage: async (params: any) => {
    return await request.get({ url: `/blog/visit-history-browse/page`, params })
  },

  // 查询游客文章浏览记录详情
  getVisitHistoryBrowse: async (id: number) => {
    return await request.get({ url: `/blog/visit-history-browse/get?id=` + id })
  },

  // 新增游客文章浏览记录
  createVisitHistoryBrowse: async (data: VisitHistoryBrowseVO) => {
    return await request.post({ url: `/blog/visit-history-browse/create`, data })
  },

  // 修改游客文章浏览记录
  updateVisitHistoryBrowse: async (data: VisitHistoryBrowseVO) => {
    return await request.put({ url: `/blog/visit-history-browse/update`, data })
  },

  // 删除游客文章浏览记录
  deleteVisitHistoryBrowse: async (id: number) => {
    return await request.delete({ url: `/blog/visit-history-browse/delete?id=` + id })
  },

  // 导出游客文章浏览记录 Excel
  exportVisitHistoryBrowse: async (params) => {
    return await request.download({ url: `/blog/visit-history-browse/export-excel`, params })
  },
}
